#include <iostream>
#include <string>
using namespace std;

class Solution
{
public:
    string compressString(string param)
    {
        string ret;
        string s;

        int cur = 0;
        while (cur < param.size())
        {
            if (s.empty() || s.back() == param[cur])
            {
                s += param[cur];

            }

            if (param[cur + 1] == '\0' || s.back() != param[cur + 1])
            {
                ret += s.back();
                if (s.size() != 1) ret += to_string(s.size());
                s.clear();
            }
            cur++;
        }

        return ret;
    }
};

int main()
{

    return 0;
}